package com.qdxwx.models.channel;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author ZhiYong
 * @createTime 2021/12/8
 * @description 频道
 */
public class Channel implements Serializable {

    private static final long serialVersionUID = 4476736146656745703L;

    //频道Id
    private int channelId;
    //频道名称
    private String channelName;
    //简介
    private String intro;
    //频道类别(0=系统；1=内部；2=连接)
    private Integer channelType;
    //连接地址
    private String linkUrl;
    //模块Id(系统/内部频道配置)
    private Integer moduleId;
    //频道目录(系统/内部频道配置)
    private String channelDir;
    //项目名称(系统/内部频道配置)
    private String itemName;
    //项目单位(系统/内部频道配置)
    private String itemUnit;
    //是否新窗口打开
    private Integer isBlank;
    //是否隐藏
    private Integer isHide;
    //是否禁用
    private Integer isDisabled;
    //排序
    private Integer sort;
    //添加时间
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    public int getChannelId() {
        return channelId;
    }

    public void setChannelId(int channelId) {
        this.channelId = channelId;
    }

    public Integer getModuleId() {
        return moduleId;
    }

    public void setModuleId(Integer moduleId) {
        this.moduleId = moduleId;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getChannelDir() {
        return channelDir;
    }

    public void setChannelDir(String channelDir) {
        this.channelDir = channelDir;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getItemUnit() {
        return itemUnit;
    }

    public void setItemUnit(String itemUnit) {
        this.itemUnit = itemUnit;
    }

    public Integer getChannelType() {
        return channelType;
    }

    public void setChannelType(Integer channelType) {
        this.channelType = channelType;
    }

    public String getLinkUrl() {
        return linkUrl;
    }

    public void setLinkUrl(String linkUrl) {
        this.linkUrl = linkUrl;
    }

    public Integer getIsBlank() {
        return isBlank;
    }

    public void setIsBlank(Integer isBlank) {
        this.isBlank = isBlank;
    }

    public Integer getIsHide() {
        return isHide;
    }

    public void setIsHide(Integer isHide) {
        this.isHide = isHide;
    }

    public Integer getIsDisabled() {
        return isDisabled;
    }

    public void setIsDisabled(Integer isDisabled) {
        this.isDisabled = isDisabled;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Channel{" +
                "channelId=" + channelId +
                ", moduleId=" + moduleId +
                ", channelName='" + channelName + '\'' +
                ", englishName='" + channelDir + '\'' +
                ", intro='" + intro + '\'' +
                ", itemName='" + itemName + '\'' +
                ", itemUnit='" + itemUnit + '\'' +
                ", isLink=" + channelType +
                ", linkUrl='" + linkUrl + '\'' +
                ", isBlank=" + isBlank +
                ", isHide=" + isHide +
                ", isDisabled=" + isDisabled +
                ", sort=" + sort +
                ", createTime=" + createTime +
                '}';
    }
}
